package com.zz.inventory.feign;

import com.ruoyi.common.core.web.domain.AjaxResult;
import org.example.dto.CouponUsageDTo;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class platformServiceFallbackFactory implements FallbackFactory<platformService> {


    @Override
    public platformService create(Throwable cause) {
        return new platformService() {
            @Override
            public AjaxResult select(CouponUsageDTo couponUsageDTo) {
                return AjaxResult.error("远程调用失败!!!!!!!!!!!!!!!!!!!!" + cause.getMessage());
            }
        };
    }
}
